;;! target = "riscv64"
;;!
;;! settings = ['enable_heap_access_spectre_mitigation=true']
;;!
;;! compile = true
;;!
;;! [globals.vmctx]
;;! type = "i64"
;;! vmctx = true
;;!
;;! [globals.heap_base]
;;! type = "i64"
;;! load = { base = "vmctx", offset = 0, readonly = true }
;;!
;;! # (no heap_bound global for static heaps)
;;!
;;! [[heaps]]
;;! base = "heap_base"
;;! min_size = 0x10000
;;! offset_guard_size = 0
;;! index_type = "i64"
;;! style = { kind = "static", bound = 0x10000000 }

;; !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
;; !!! GENERATED BY 'make-load-store-tests.sh' DO NOT EDIT !!!
;; !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

(module
  (memory i64 1)

  (func (export "do_store") (param i64 i32)
    local.get 0
    local.get 1
    i32.store8 offset=0x1000)

  (func (export "do_load") (param i64) (result i32)
    local.get 0
    i32.load8_u offset=0x1000))

;; function u0:0:
;; block0:
;;   lui t4,65535
;;   addi t4,t4,4095
;;   ld t0,0(a2)
;;   add t0,t0,a0
;;   lui t1,1
;;   add t0,t0,t1
;;   li t1,0
;;   ugt t4,a0,t4##ty=i64
;;   selectif_spectre_guard t2,t1,t0##test=t4
;;   sb a1,0(t2)
;;   j label1
;; block1:
;;   ret
;;
;; function u0:1:
;; block0:
;;   lui t4,65535
;;   addi t4,t4,4095
;;   ld t0,0(a1)
;;   add t0,t0,a0
;;   lui t1,1
;;   add t0,t0,t1
;;   li t1,0
;;   ugt t4,a0,t4##ty=i64
;;   selectif_spectre_guard t2,t1,t0##test=t4
;;   lbu a0,0(t2)
;;   j label1
;; block1:
;;   ret
